<?php
require_once "../database/mysql.class.php";
//DAO对象，对数据库操作
//对应用户表，用户的增删改查

class chongzhisetdao{

	private $db;

	public function __construct(){
		$this->db=new mysql();
	}
	
	public function Chaxun($select=null){	
		if (!isset($select)){
			$sql="select * from chzhi order by time DESC;";
			return $this->db->query($sql);
		}
		else if (isset($select)){
			//echo $select;
			$sql="select *  from chzhi  where jiekou='".$select."' order by time DESC;";
		    return $this->db->query($sql);
		}
		else {
			
		}
	}
	public function Chaxunjk(){
			$sql="select jiekou from chzhijk;";
			return $this->db->query($sql);
	}
}
?>